﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using Utility.Math;

public static class CoordUtility
{
	public static Vector2Int LocalToWorldCoord (this Vector2Int localCoord, Vector2Int origin, Rotation4 orientation)
	{
		return origin + orientation * localCoord;
	}

	public static Vector2Int WorldToLocalCoord (this Vector2Int worldCoord, Vector2Int origin, Rotation4 orientation)
	{
		return -orientation * (worldCoord - origin);
	}
}
